#pragma once

#include <cmath>
#include <limits>
#include <vector>
#include "geometry.h"
#include "model.h"
#include "tgaimage.h"
#include "Shader.h"

class rasterization{
private:
  int width,height;

public:

  rasterization(int width, int height);

  void drawAPoint(vec3 point, const TGAColor& color);

  void drawALine(vec3 p1, vec3 p2, TGAImage& image, const TGAColor& color);

  // 画边线图
  void drawTriangle(Model* model, TGAImage& image, TGAColor color);

  // 光栅化
  void rasterize(Model* model, TGAImage& image, Shader& Shader);

};

